home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Example Projects / Reusable Classes_Code / User Interface / CBevelGroupBox 1.1 / Read Me < prev   
Encoding:
Text File  |  1999-06-27  |  3.5 KB  |  79 lines

  1.  
  2.  
  3.  
  4.  
  5. cBevelGroupBox 1.1
  6. ©1999 SearchWare Solutions
  7. http://www.radiks.net/~search
  8. searchsol@home.com
  9.  
  10. by Scott Crick
  11.  
  12. What it is
  13. cBevelCanvas is a sub-class of the canvas class which will allow you to draw a beveled group box (a group box with a 3D look). This type of group-box is used in many different software packages (i.e. ATM, GoMac, Action Files, etc...). cBevelGroupBox should be fully Appearance Manage compliant.
  14.  
  15. How to use it
  16. 1.    Open an existing project or create a new project.
  17. 2.    Drag the cBevelGroupBox icon into the Project window.
  18. 3.    Open an existing window, or create a new window.
  19. 4.    Drag a canvas control into the window, and size it according to how large you would like the Bevelled Group Box to be.
  20. 5.    Set the Super of the canvas (in the Properties window) to "cBevelGroupBox"
  21.  
  22. Now, when you run your project and open the appropriate window, you will see the bevelled group box!
  23.  
  24. Events
  25.  
  26. Open
  27. This event fires when the control is first created at runtime. It fires before the control is drawn, so this is a useful place to initially configure the cBevelGroupBox's properties.
  28.  
  29. Properties
  30. A cBevelGroupBox control can be used without any configuration, however it also has several properties to help customize the control. Note that the examples provided below assume a bevel group box control named "bevelBox".
  31.  
  32. bevelWidth (integer)
  33. This property sets the width of the bevel of the group box. It defaults to 2 pixels.
  34.  
  35.         bevelBox.bevelWidth = 1
  36.  
  37. text (string)
  38. This property allows you to add a label to the bevelled group box. By default, there is no text.
  39.  
  40.         bevelBox.text = "Preferences:"
  41.  
  42. textFont (string)
  43. This property allows you to change the typestyle of the bevelled group box's label. Note that you must place quotes around the font's name when assigning this property. It defaults to "System" (the system font).
  44.  
  45.         bevelBox.textFont = "Geneva"
  46.  
  47. textSize (integer)
  48. This property allows you to change the size of the bevelled group box's label. It defaults to 12 points.
  49.  
  50.         bevelBox.textSize = 10
  51.  
  52. bold (boolean)
  53. This property allows you to change the bold property of the bevelled group box's label. It defaults to false.
  54.  
  55.         bevelBox.bold = true
  56.  
  57. italic (boolean)
  58. This property allows you to change the italic property of the bevelled group box's label. It defaults to false.
  59.  
  60.         bevelBox.italic = true
  61.  
  62. underline (boolean)
  63. This property allows you to change the underline property of the bevelled group box's label. It defaults to false.
  64.  
  65.         bevelBox.underline = true
  66.  
  67. It is recommended that you set the properties of the cBevelGroupBox in the control's open event. If you do it in this event, then the group box will display with your properties with no further need for code on your part. You can change the properties elsewhere in your code, though. However, if you change the code anywhere other than the open event, you will need to call the bevelGroupBox's refresh method before the changes will display.
  68.  
  69.         bevelBox.refresh
  70.  
  71. What it does not do
  72. Because the cBevelGroupBox is a sub-class of the canvas control, REALbasic does not recognize the control as an actual group box. Be sure to take this into account if using the cBevelGroupBox to group radio buttons and other similar controls.
  73.  
  74. Version History
  75. 1.1        Added Open event. REALbasic 2.x is now required.
  76. 1.0        Initial Release
  77.  
  78. Licensing Info
  79. cBevelGroupBox is free for your use in your own projects with no further obligation on your part. You do not need to give me credit of any kind. However, I do maintain ownership of cBevelGroupBox. Please do not redistribute this custom class without this readme file.